package com.atguigu.servicevod.utils;

import lombok.Setter;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author kabuda
 * @create 2023-04-28 10:51
 */
@ConfigurationProperties(prefix = "aliyun.oss.file")
@Component
@Setter
public class ConstantPropertiesUtils implements InitializingBean {
    //不能给静态变量赋值
    public  String keyid;
    public  String keysecret;


    public static String ACCESS_KEY_ID;
    public static String ACCESS_KEY_SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        ACCESS_KEY_ID = keyid;
        ACCESS_KEY_SECRET = keysecret;
    }

}
